<!-- pass a variable to included page -->
<%@ page import="SSP.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<% 
   String today = null;
   Today t = new Today();
   today = t.getToday();
   request.setAttribute("picture","InstructorSamples");
   request.setAttribute("title", "Customer List (for internal use only)");  
   request.setAttribute("header", "Welcome : Today is " + today); 
 %>
 <%@ include file="header.jsp"%>
<TD width="850" vAlign="top"> 

<br /><h2>Customer List</h2><br />
<table width=100% border=0>

<tr>
		<tr>
		<th bgcolor="#3B73B9" style="color:white;">Customer Name</th>
		<th bgcolor="#3B73B9" style="color:white;">Customer Type</th>
		<th bgcolor="#3B73B9" style="color:white;">CityState</th>
		<th bgcolor="#3B73B9" style="color:white;">Contact Name</th>
		<th bgcolor="#3B73B9" style="color:white;">Contact Number</th>
		</tr>

<%
ResultSet rs = null;
Customer c = new Customer();
rs = c.getCustomerList();

	 

 while (rs.next()) {   
%>
        <tr>
		<td><a href="customerdetails.jsp?customerid=<%=rs.getString("CUSTOMERID")+"&msgid=0" %>">
        <%=rs.getString("CUSTOMERNAME")%></a></td> 
		<td><%=rs.getString("customertypedesc")%></td>
		<td><%=rs.getString("billingcity") + ", " + rs.getString("billingstate")%></td>
		<td><%=rs.getString("contactfirstname") + " " + rs.getString("contactlastname")%></td>
		<td><%=rs.getString("contactphone")%></td>
		</tr>
 <%  } %>
 
</table>
<%
rs.close();
c.closeConnection(); 
%>
</TD></TR></TABLE></body></html>